export const order = `#graphql
query Order($id:String!){
    order(id:$id){
      _id
      orderId
      deliveryAddress{
        location{coordinates}
        deliveryAddress
        details
        label
        id
      }
      restaurant{
        _id
        name
        image
        address
        location{coordinates}
      }
      items{
        title
        food
        description
        image
        quantity
        variation{
          title
          price
          discounted
        }
        addons{
          title
          options{
            title
            description
            price
          }
        }
      }
      user{
        _id
        name
        email
      }
      paymentMethod
      orderAmount
      orderDate
      expectedTime
      isPickedUp
      deliveryCharges
      acceptedAt
      pickedAt
      deliveredAt
      cancelledAt
      assignedAt
    }
  }
  `;

export const myOrders = `#graphql
  query Orders($offset:Int){
    orders(offset:$offset){
      _id
      orderId
        id
      restaurant{
        _id
        name
        image
        address
        location{coordinates}
      }
      deliveryAddress{
        location{coordinates}
        deliveryAddress
        id
      }
      items{
        _id
        id
        title
        food
        description
        quantity
        image
        variation{
          _id
          id
          title
          price
          discounted
        }
        addons{
          _id
          id
          options{
            _id
            id
            title
            description
            price
          }
          title
          description
          quantityMinimum
          quantityMaximum
        }
      }
      user{
        _id
        name
        phone
      }
      rider{
        _id
        name
        phone
      }
      review{
        _id
        rating
      }
      paymentMethod
      paidAmount
      orderAmount
      orderStatus
      paymentStatus
      tipping
      taxationAmount
      createdAt
      completionTime
      preparationTime
      orderDate
      expectedTime
      isPickedUp
      deliveryCharges
      acceptedAt
      pickedAt
      deliveredAt
      cancelledAt
      assignedAt
      instructions
    }
  }
  `;
